<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="css/index.css" />
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/detali.css" />
    <title>Document</title>
    <style></style>
  </head>
  <body>
    <div class="top_bar">
      <div class="wrapper">
        <div class="client-enter">
          <a class="omg sj" href="">手机客户端</a>
          <div class="client-enter-body">
            <h3 class="omg"></h3>
            <div class="clearfix">
              <img src="img/4.png" alt="" />
              <h4>中关村在线客户端</h4>
              <div class="client-btns">
                <a class="" href=""><b class="omg cv"></b>Android版</a>
                <a class="omg ca" href="">iPhone版</a>
              </div>
            </div>
          </div>
        </div>
        <a class="ps" href="">产品报价</a>
        <a class="ps op" href="">产品入库<i class="ss os"></i></a>
        <a class="ps" href="">商家库推广</a>
        <a class="ps" href="">广告推广</a>
        <div class="ic">
          <span class="register">欢迎</span><span id="tui"></span>
          <a class="omg ss wb"></a>
          <a class="omg ss qq"></a>
          <a class="omg ss wx"></a>
        </div>
      </div>
    </div>

    <div>
      <div class="shangpin"></div>
    </div>

    <div class="zum">
      <a href="cart.html">进入购物车</a>
    </div>

    <div class="bottom">
      <div class="bottom-center">
        <div class="bottom-center-top">
          <p>
            <strong>全国渠道代表：</strong><a href="">西安站</a>|<a href=""
              >成都站</a
            >|<a href="">河北站</a>|<a href="">山西站</a>|<a href="">河南站</a
            >|<a href="">云南站</a>|<a href="">福建站</a>|<a href="">南宁站</a
            >|<a href="">天津站</a>|<a href="">更多</a>
          </p>
          <p>
            <strong>代理招募热线：</strong>
            <a href=""> 孟女士 010-83417888-9918</a>
          </p>
        </div>
        <div class="bottom-center-center" style="height: 105px">
          <ul>
            <h4>关于我们</h4>
            <li style="padding-top: 3px"><a href="">公司简介</a></li>
            <li><a href="">法律声明</a></li>
            <li><a href="">招聘信息</a></li>
          </ul>
          <ul>
            <h4>加盟合作</h4>
            <li style="padding-top: 3px"><a href="">媒体合作</a></li>
            <li><a href="">品牌大全</a></li>
            <li><a href="">联系方式</a></li>
          </ul>
          <ul>
            <h4>营销服务</h4>
            <li style="padding-top: 3px"><a href="">营销推广</a></li>
            <li><a href="">法律声明</a></li>
            <li><a href="">网商通</a></li>
          </ul>
          <ul>
            <h4>用户中心</h4>
            <li style="padding-top: 3px"><a href="">帐号注册</a></li>
            <li><a href="">站点地图</a></li>
            <li><a href="">反馈纠错</a></li>
          </ul>
          <ul>
            <h4>关注我们</h4>
            <li style="padding-top: 3px"><a href="">微信关注</a></li>
            <li><a href="">微博关注</a></li>
            <li><a href="">头条关注</a></li>
          </ul>
          <ul>
            <h4>客户端下载</h4>
            <img src="img/010.png" alt="" />
          </ul>
          <ul>
            <h4>关注公众号</h4>
            <img src="img/028.jpg" alt="" />
          </ul>
        </div>
        <div class="bottom-center-botton">
          <ul>
            <li><img src="img/029.jpg" alt="" /></li>
            <li><img src="img/011.png" alt="" /></li>
            <li><img src="img/012.png" alt="" /></li>
            <li><img src="img/030.jpg" alt="" /></li>
          </ul>
        </div>
        <div class="lastts">
          <p>
            <a href="">京B2-20200543</a>&nbsp;
            <a href="">京ICP备14061128号</a>&nbsp;
            <a href="">京公网安备11010802020026号</a>&nbsp;
            <a href="">网络文化经营许可证京网文[2020]5356-1048</a>&nbsp;
            <a href="">（京）网药械信息备字（2022）第00054号</a>
          </p>
          <p>
            <a href="">未成年人家长监护</a>&nbsp;<a href="">风险监测</a>&nbsp;
            <span>违法和不良信息举报电话：010-64218167</span>&nbsp;
            <span>举报邮箱：jubao@zol.com.cn</span>&nbsp;
            <span>北京知行锐景科技有限公司</span>&nbsp;<span>版权所有</span>
          </p>
          <p>
            <span>北京市东城区和平里东街11号航星科技园航星3号楼5层</span>&nbsp;
            <a href="">京演(机构) (2022) 5175号</a>&nbsp;
            <a href="" style="color: red">网站经营者信息公示</a>&nbsp;
            <a href="" style="color: red">经营者履行社会责任公示信息</a>&nbsp;
          </p>
          <p><a href="">广播电视节目制作经营许可证号（京）字第08010号</a></p>
        </div>
      </div>
    </div>
    <script src="js/axios.js"></script>
    <script src="js/jquery.js"></script>
    <script>
      $(function () {
        let pid = location.search.split("=")[1];
        axios
          .get("http://jx.xuzhixiang.top/ap/api/detail.php", {
            params: { id: pid },
          })
          .then((resData) => {
            let data = resData.data.data;
            console.log(data);
            $(".shangpin").html(`
            <img src="${data.pimg}">
            <span>JD</span>
            <p>名称:${data.pname}</p>
            <p style="color: red;">价格：￥${data.pprice}</p>
            <p>介绍：${data.pdesc}</p>
            <input type="text" class="num" value="1">
            <input type="button" class="btn" value="加入购物车">
          `);

            // $("input")
            //   .eq(0)
            //   .click(function () {
            //     let a = $(".num").val();
            //     a += 1;
            //   });

            $(".btn").click(function () {
              axios
                .get("http://jx.xuzhixiang.top/ap/api/add-product.php", {
                  params: {
                    uid: localStorage.getItem("uid"),
                    pid: pid,
                    pnum: Number($(".num").val()),
                  },
                })
                .then((resData) => {
                  console.log(resData.data);
                  // location.href = "cart.html";
                });
            });
          });
        //134148
        //3059e85eb599c0b616f7605fe418be74
      });
    </script>
  </body>
</html>
